package com.niguang.work.api.enums;

import lombok.Getter;

@Getter
public enum RoleApplyFlagEnum {

    NOT_REFORM(1, "无需整改"),

    WAIT_REFORM(2, "待整改"),

    OK_APPLY(3, "通过"),

    NO_APPLY(4, "不通过");

    private Integer index;

    private String desc;

    RoleApplyFlagEnum(Integer index, String desc) {
        this.index = index;
        this.desc = desc;
    }

    public static String getName(Integer index) {
        for (RoleApplyFlagEnum c : RoleApplyFlagEnum.values()) {
            if (c.index.equals(index)) {
                return c.desc;
            }
        }
        return "";
    }
}
